<?php

namespace app\admin\model\cms;

use think\Model;


class Plate extends Model
{

    // 表名
    protected $name = 'plate';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
        'plateicon_url'
    ];


    public function getPlateiconUrlAttr($value, $data)
    {

        $value = $data['plateicon'] ? $data['plateicon'] : '/assets/img/noimage.jpg';
        return cdnurl($value, true);
    }
    







}
